<style>
.sectionprice{
padding:0 0 0 0;
margin:0 0 0 0;
}
.sectionprice tbody tr{
padding:0 0 0 0;
margin:0 0 0 0;
}
.sectionprice tbody tr td{
padding:0 0 0 0;
margin:0 0 0 0;
text-align:center;
width:40px;
height:30px;
line-height:20px;
}
.sectionprice tbody tr td div{
width:80px;
}

</style>
<div class="pageContent">
	
	<form method="post" action="/index.php?act=transportprice&st=save_table" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<div class="pageFormContent" layoutH="58">
			<input type="hidden" name="tmp_id" value="{$tmp_id}" />
			<!--table 表格-->
			<center>
				<table border="1" style="width:95%" class="sectionprice">
					<thead>
						<tr style="height:30px">
							<!--条件-->
							{if in_array($tmp_info.tmp_type, array(1,3))}
							<th width="80" colspan="4">地区</th>
							{else}
							<th width="80" colspan="3">地区</th>
							{/if}
							<th width="80" colspan="{$count}">区间价格</th>
						</tr>
						<tr style="height:30px">
							<th>省</th>
							<th>市</th>
							<!--条件-->
							{if $tmp_info.tmp_type eq 1}
							<th>区/县</th>
							<th>街道</th>
							{elseif $tmp_info.tmp_type eq 2}
							<th>地区站</th>
							{elseif $tmp_info.tmp_type eq 3}
							<th>港口</th>
							<th>过驳目的港</th>
							{elseif $tmp_info.tmp_type eq 4}
							<th>地区码头</th>
							{/if}
							{foreach from=$section item=item}
							<th>( {$item.min} , {$item.max} ]</th>
							{/foreach}
						</tr>
					</thead>
					<tbody>
						{assign var="currentVal" value=""}
						{assign var="currentVal2" value=""}
						{assign var="currentFlag" value=""}
						{assign var="currentFlag2" value=""}
						{foreach from=$area_list item=item key=key}
								<!--条件-->
								{if $tmp_info.tmp_type eq 1}
								{assign var="currentVal" value=$item.street}
								{assign var="currentVal2" value=$item.area}
								{elseif $tmp_info.tmp_type eq 2}
								{assign var="currentVal" value=$item.area_station}
								{assign var="currentVal2" value=$item.city}
								{elseif $tmp_info.tmp_type eq 3}
								{assign var="currentVal" value=$item.port}
								{assign var="currentVal2" value=$item.port_dest}
								{elseif $tmp_info.tmp_type eq 4}
								{assign var="currentVal" value=$item.area_wharf}
								{assign var="currentVal2" value=$item.city}
								{/if}
							{if $currentVal neq $currentFlag or $currentVal2 neq $currentFlag2}
								<!--条件-->
								{if $tmp_info.tmp_type eq 1}
								{assign var="currentFlag" value=$item.street}
								{assign var="currentFlag2" value=$item.area}
								{elseif $tmp_info.tmp_type eq 2}
								{assign var="currentFlag" value=$item.area_station}
								{assign var="currentFlag2" value=$item.city}
								{elseif $tmp_info.tmp_type eq 3}
								{assign var="currentFlag" value=$item.port}
								{assign var="currentFlag2" value=$item.port_dest}
								{elseif $tmp_info.tmp_type eq 4}
								{assign var="currentFlag" value=$item.area_wharf}
								{assign var="currentFlag2" value=$item.city}
								{/if}
								
								<tr style="height:30px">
									<td>{$item.province}</td>
									<td>{$item.city}</td>
									<!--条件-->
									{if $tmp_info.tmp_type eq 1}
									<td>{$item.area}</td>
									<td>{$item.street}</td>
									{elseif $tmp_info.tmp_type eq 2}
									<td>{$item.area_station}</td>
									{elseif $tmp_info.tmp_type eq 3}
									<td>{$item.port}</td>
									<td>{$item.port_dest}</td>
									{elseif $tmp_info.tmp_type eq 4}
									<td>{$item.area_wharf}</td>
									{/if}
									<td><div><input type="text" name="price[{$item.transport_price_id}]" value="{$item.transport_price}" class="number" size="7" style="clear: both; "></div></td>
							{else}
									<td><div><input type="text" name="price[{$item.transport_price_id}]" value="{$item.transport_price}" class="number" size="7" style="clear: both; "></div></td>
								{if ($key+1)%$count eq 0}
								</tr>
								{/if}
							{/if}

						{/foreach}
					</tbody>
				</table>
			</center>
			<!--end table 表格-->
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>
